﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.Regions;
using Microsoft.Practices.Unity;

namespace DiscoveryLogic.Analytics.Modules.Entities
{
    public class OrgTreeModule:IModule 
    {
        public OrgTreeModule(IUnityContainer container, IRegionManager regionManager)
		{
			Container = container;
			RegionManager = regionManager;
		}

		public IUnityContainer Container { get; private set; }
		public IRegionManager RegionManager { get; private set; }

        public void Initialize()
        {
            OrgTreeView grantTreeView = Container.Resolve<OrgTreeView>();
            RegionManager.Regions["EntityTreeRegion"].Add(grantTreeView);
        }
    }
}
